-
Notifications
You must be signed in to change notification settings - Fork 119
fix(form-pill): fix issues where pill text not being truncated #4047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 2186bfa The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 2186bfa. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Size Change: +181 B (0%) Total Size: 1.09 MB
ℹ️ View Unchanged
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2186bfa:
|
Paste
|
Project |
Paste
|
Branch Review |
fix/multiselect-pill-long-text
|
Run status |
|
Run duration | 02m 18s |
Commit |
|
Committer | kodiakhq[bot] |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
67
|
View all changes introduced in this branch ↗︎ |
packages/paste-core/components/combobox/stories/MultiselectCombobox.stories.tsx
Outdated
Show resolved
Hide resolved
…bobox.stories.tsx Co-authored-by: Sarah <sali@twilio.com>
…ix/multiselect-pill-long-text
…bs/paste into fix/multiselect-pill-long-text
); | ||
}; | ||
|
||
PillNarrowContainerFormattedTextContent.storyName = "Pill Narrow Container Formatted Text Content"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion(non-blocking) this line isn't necessary unless you're changing the name of the story, adds errors to the file
/> | ||
) : null} | ||
{index % 3 === 1 ? <CalendarIcon decorative size={size === "large" ? "sizeIcon20" : "sizeIcon10"} /> : null} | ||
<Text fontWeight="fontWeightBold" fontStyle="italic"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: Text should have an as
prop
}> | ||
> = ({ selected = false, dismissable = true, disabled = false, ariaLabel = "Basic pills:", size }) => { | ||
const pillState = useFormPillState(); | ||
const pillState2 = useFormPillState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion(non-blocking): should this line be removed? doesn't look like it's being used
packages/paste-core/components/form-pill-group/stories/index.stories.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…tories.tsx Co-authored-by: Nora Krantz <75342690+nkrantz@users.noreply.github.com>
Paste
|
Project |
Paste
|
Branch Review |
fix/multiselect-pill-long-text
|
Run status |
|
Run duration | 06m 06s |
Commit |
|
Committer | krisantrobus |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
125
|
View all changes introduced in this branch ↗︎ |
Addresses an issue where form pill text would wrap when it is longer than form pill group parent.
Key considerations when working with FormPillGroup. As FormPillGroup wraps the pills there should be no ability to overflow the width of the formPillGroup, only to stretch as far as the parent group. In order to achieve this I need to find the string of the children as it could potentially be be composed like our storybooks. Apply the truncate only to the string. Currently for pill we would see the same issue with long text as we were already seeing in the original bug, it is not limited to being in a popover but to any narrow container.
Before:

After:

